<template>
<div class="buy" >
  <p><i class="el-icon-s-ticket"></i> 购票渠道</p>
  <div class="ticket-con" v-for="item in ticketInfo" :key="item.buy_id">
    <div class="ticket-tab">
      <a href="javascript:;"  class="ticket-btn-active ticket-btn1">{{item.title}}</a>
    </div>
    <div class="ticket-list">
      <div class="ticket-img">
        <img :src="item.picture" alt="">
        <div class="ticket_finish">
          已结束
        </div>
      </div>
      <div class="ticket-word">
        <div class="ticket-title">
            {{item.title}}
        </div>
        <div class="ticket-time">
          售票时间：
          <span>12-04</span>
        </div>
        <div class="ticket-place">
          场馆名字：
          <span>{{item.match_place}}</span>
        </div>
        <div class="ticket-site">
        场馆地址：
        <span>{{item.match_addr}}</span>
        </div>
        <div class="ticket-price">
        单场价：
        <b>48元</b>
        </div>
        <a :href="item.match_url" target="_blank" class="ticket-buy-disabled">立即购票</a>
      </div>
    </div>
  </div>
</div>
</template>
<script>
export default {
  data: () => ({
    ticketInfo: []
  }),
  created () {
    this.getticket()
  },
  methods: {
    async getticket () {
      const data = await this.$axios.get('/match/buyticketdata')
      this.ticketInfo = data.data
      console.log(this.ticketInfo)
      // console.log(this.hotmatch)
    }
  }
}
</script>
<style lang="less" scoped>
.buy{
  width: 385px;
  box-sizing: border-box;
  p{
    border-bottom: 2px solid #ddd;
    font-size: 20px;
    padding-bottom: 10px;
  }
  .ticket-con{
    margin-top: 10px;
    .ticket-tab {
      height: 40px;
      margin-left: 2px;
      .ticket-btn1 {
        display: inline-block;
        font-size: 12px;
        background: #f4f5f4;
        width: 100%;
        height: 40px;
        color: #333;
        text-align: center;
        line-height: 40px;
      }
      .ticket-btn-active {
        background: #f3c258;
        color: #fff;
      }
    }
    .ticket-list {
      margin-top: 5px;
      background: #f4f5f4;
      width: 100%;
      height: 225px;
      .ticket-img {
        float: left;
        position: relative;
        img {
          width: 157px;
          height: 212px;
          margin-top: 5px;
          margin-left: 5px;
          float: left;
        }
        .ticket_finish {
          display: block;
          padding: 3px 5px;
          border-radius: 5px;
          position: absolute;
          left: 10px;
          top: 10px;
          background: #737373;
          font-size: 12px;
          color: #fff;
        }
      }
      .ticket-word {
        float: left;
        width: 210px;
        font-size: 14px;
        margin-left: 8px;
        font-weight: 700;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        .ticket-title {
          font-size: 18px;
          margin-top: 4px;
        }
        span {
          width: 135px;
          font-weight: 400;
          float: right;
        }
        .ticket-site {
          display: inline-block;
        }
        .ticket-price b {
          padding: 2px 5px;
          border-radius: 5px;
          background: #f3c258;
        }
        .ticket-buy-disabled {
          background: url(//game.gtimg.cn/images/yxzj/match/center2018/images/buynow-disabled.png) no-repeat;
          width: 212px;
          height: 36px;
          display: block;
          margin-bottom: 10px;
          line-height: 36px;
          text-align: center;
          color: #363636;
          font-size: 18px;
        }
      }
    }
  }
}
</style>
